package com.sf.iisp.webservice.biz.client;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

import com.sf.iisp.bind.domain.ReturnBindingInfo;
import com.sf.iisp.webservice.biz.IBindPhoneWs;
import com.sf.iisp.webservice.biz.IBindResultWs;
import com.sf.novatar.context.AppContext;

public class BindPhonWsClient {

    public String returnBindResult(ReturnBindingInfo bindResult) {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setServiceClass(IBindResultWs.class);
        String port = String.valueOf(AppContext.getContext().getHttpPort());
        factory.setAddress("http://10.118.40.38:" + port + "/ws/BindResult");
        IBindResultWs greetingService = (IBindResultWs) factory.create();
        return greetingService.bindPhoneResult(bindResult);
    }

}
